<template>
	<div class="ele-body">
		<div class="bg-fff">
			<a-form :label-col="{ md: { span: 2 }, sm: { span: 4 }, xs: { span: 24 } }"
				:wrapper-col="{ md: { span: 22 }, sm: { span: 20 }, xs: { span: 24 } }">
				<a-row :gutter="24">
					<a-col :md="24" :sm="24" :xs="24">
						<div>
							<div class="padding-15">
								<div class="flex align-center justify-between margin-bottom-15">
									<span class="fs-14">会员信息</span>
								</div>
								<table cellpadding="0" cellspacing="0" class="recepit_table2">
									<tbody>
										<tr>
											<td class="tit">会员姓名</td>
											<td>{{ info.member_name || '' }}</td>
											<td class="tit">会员手机号</td>
											<td>{{ info.member_mobile || '' }}</td>
											<td class="tit">会员ID</td>
											<td>{{ info.member_id || '' }}</td>
										</tr>
									</tbody>
								</table>
							</div>
							<div class="padding-15">
								<div class="flex align-center justify-between margin-bottom-15">
									<span class="fs-14">基本信息</span>
								</div>
								<table cellpadding="0" cellspacing="0" class="recepit_table2">
									<tbody>
										<tr>
											<td class="tit">维修项目</td>
											<td>{{ info.repair_item_code_name || '' }}</td>
											<td class="tit">原消费单</td>
											<td>{{ info.origin_order_sn || '' }}</td>
											<td class="tit">取货方式</td>
											<td>{{ info.receive_type_name || '' }}</td>
										</tr>
										<tr>
											<td class="tit">购买日期</td>
											<td>{{ info.sales_time || '' }}</td>
											<td class="tit">单号</td>
											<td>{{ info.order_sn || '' }}</td>
											<td class="tit">状态</td>
											<td>{{ info.stats_name || '' }}</td>
										</tr>
										<tr>
											<td class="tit">维修地点</td>
											<td>{{ info.repair_type_name || '' }}</td>
											<td class="tit">实际维修项目</td>
											<td>{{ info.real_repair_item_code_name || '' }}</td>
											<td class="tit">创建时间</td>
											<td>{{ info.create_time || '' }}</td>
										</tr>
										<tr>
											<td class="tit">预估维修费用（元）</td>
											<td>{{ info.repair_evaluate || '' }}</td>
											<td class="tit">实际维修费用（元）</td>
											<td>{{ info.real_amount || '' }}</td>
											<td class="tit">预计完成日期</td>
											<td>{{ info.predict_complete_time || '' }}</td>
										</tr>
										<tr>
											<td class="tit">维修成本（元）</td>
											<td>{{ info.cost || '' }}</td>
											<td class="tit">备注</td>
											<td colspan="3">{{ info.handle_note || '' }}</td>
										</tr>
									</tbody>
								</table>
							</div>
							<div class="padding-15">
								<div class="flex align-center justify-between margin-bottom-15">
									<span class="fs-14">货品信息</span>
								</div>
								<table cellpadding="0" cellspacing="0" class="recepit_table2">
									<tbody>
										<tr>
											<td class="tit">货品条码</td>
											<td>{{ info.bar_code || '' }}</td>
											<td class="tit">货品名称</td>
											<td>{{ info.name || '' }}</td>
											<td class="tit">货重(g)</td>
											<td>{{ info.piece_weight || '' }}</td>
										</tr>
										<tr>
											<td class="tit">货品小类</td>
											<td>{{ info.subclass_code_name || '' }}</td>
											<td class="tit">成色</td>
											<td>{{ info.quality_code_name || '' }}</td>
											<td class="tit">品类</td>
											<td>{{ info.store_name || '' }}</td>
										</tr>
										<tr>
											<td class="tit">主石名称</td>
											<td>{{ info.refund_sn || '' }}</td>
											<td class="tit">主石重(t)</td>
											<td>{{ info.create_time || '' }}</td>
											<td class="tit">主石颜色</td>
											<td>{{ info.classes_code_name || '' }}</td>
										</tr>
										<tr>
											<td class="tit">主石净度</td>
											<td>{{ info.main_stone_neatness_name || '' }}</td>
											<td class="tit">主石切工</td>
											<td>{{ info.main_stone_cut_name || '' }}</td>
											<td class="tit">货品估价</td>
											<td>{{ info.evaluate || '' }}</td>
										</tr>
										<tr>
											<td class="tit">故障描述</td>
											<td>{{ info.desc || '' }}</td>
											<td class="tit">备注</td>
											<td colspan="3">{{ info.note || '' }}</td>
										</tr>
										<tr>
											<td class="tit">图片</td>
											<td colspan="3">
												<a-image :width="60" :height="60" :src="info.img_url" v-if="info.img_url" />
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
					</a-col>
				</a-row>
			</a-form>
		</div>
	</div>
</template>

<script setup>
	import {
		ref,
		reactive,
		unref,
		onMounted
	} from 'vue';
	import {
		useRouter
	} from 'vue-router';
	import {
		message,
		Modal
	} from 'ant-design-vue';
	import {
		finishPageTab,
		reloadPageTab
	} from '@/utils/page-tab-util';
	import { get_repair_order_detail, get_goods_order_info } from '@/api/order/repair_order';
	const {
		currentRoute,
		push
	} = useRouter();
	const {
		query
	} = unref(currentRoute);
	const loading = ref(false);
	const info = ref({});

	onMounted(() => {
		console.log(query);
		get_repair_order_detail({
			order_sn: query.order_sn
		}).then((res) => {
			info.value = res;
		});
	});
</script>

<style lang="less" scoped></style>